home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 4
/
Aminet 4 - November 1994.iso
/
aminet
/
comm
/
misc
/
mirrorman_1_10b1.lha
/
MirrorManager-1.10b1
/
rexx
/
Configure
< prev
next >
Wrap
Text File
|
1994-06-24
|
11KB
|
365 lines
;;
;; $VER: $Id: Configure,v 1.7 1994/06/18 13:11:29 tf Exp $
;;
;; Installer script configuring pathnames in MirrorManager.rexx
;; Initial revision by Tobias Ferber
;;
;@
(set IncomingPath "")
(set AminetPath "")
(set KickedPath "")
(set FastIndexPath "")
(set AminetIndexFile "")
(set AminetRecentFile "")
(set AminetTreeFile "")
(set LocalIndexFile "")
(set WantedIndexFile "")
(set HiddenFile "")
(set IndexedFile "")
(set RemapFile "")
;@
(set ConfigureREXX "Configure.rexx")
(set AssignmentsFile "RAM:AssignmentsTemp.tmp")
(set ProgramIcon (tackon (pathonly (expandpath @execute-dir)) "MirrorManager"))
(set RX-command (if (exists "SYS:rexxc/rx") ("SYS:rexxc/rx") ("rx"))) ;`which rx`
;***
(procedure configureMirrorManager
; configureScript
(working ("Configuring %s" configureScript))
;;
(complete 0)
(set IncomingPath (askdir
(prompt
"Please select your incoming path"
)
(help
"The incoming path should contain the files you download from Aminet. "
"This is normally the receive path of your terminal program."
"\n\n"
"For example: \"incoming:\""
)
(default IncomingPath)
))
;;
(complete 5)
(set AminetPath (askdir
(prompt
"Please select your Aminet path"
)
(help
"The Aminet path is the root directory of your local Aminet mirror. "
"Files will be copied from the incoming path to this directory "
"or to a subdirectory relative to this directory."
"\n\n"
"For example: \"downloads:aminet\""
)
(default AminetPath)
))
(complete 10)
;; Eventually set initial defaults
(if (= (strlen KickedPath) 0) (set KickedPath (tackon AminetPath "kicked")) )
(if (= (strlen FastIndexPath) 0) (set FastIndexPath (tackon AminetPath "fastindex")) )
(if (= (strlen AminetIndexFile) 0) (set AminetIndexFile (tackon AminetPath "INDEX")) )
(if (= (strlen AminetRecentFile) 0) (set AminetRecentFile (tackon AminetPath "RECENT")) )
(if (= (strlen AminetTreeFile) 0) (set AminetTreeFile (tackon AminetPath "TREE")) )
(if (= (strlen LocalIndexFile) 0) (set LocalIndexFile (tackon AminetPath "LOCAL")) )
(if (= (strlen WantedIndexFile) 0) (set WantedIndexFile (tackon AminetPath "WANTED")) )
(if (= (strlen HiddenFile) 0) (set HiddenFile (tackon AminetPath "HIDDEN")) )
(if (= (strlen IndexedFile) 0) (set IndexedFile (tackon AminetPath "INDEXED")) )
(if (= (strlen RemapFile) 0) (set RemapFile (tackon AminetPath "MAP")) )
(complete 15)
(set KickedPath (askdir
(prompt
"Please select your kick off Aminet path"
)
(help (cat
"When examining your local index MirrorManager might find "
"files which do not exist (anymore) in the Aminet index file. "
"These files can be moved (kicked) into the Aminet kick off path."
"\n\n"
("For example: \"%s\"" (tackon AminetPath "kicked"))
))
(default KickedPath)
))
;;
(complete 20)
(set AminetIndexFile (askfile
(prompt
"Please select your Aminet INDEX file"
)
(help (cat
"The Aminet INDEX file can be obtained (downloaded) from Aminet. "
"It is a list containing almost any file in Aminet. "
"MirrorManager needs this file. "
"\n\n"
("For example: \"%s\"" (tackon AminetPath "INDEX"))
))
(default AminetIndexFile)
))
;;
(complete 25)
(set AminetRecentFile (askfile
(prompt
"Please select your Aminet RECENT file"
)
(help (cat
"The Aminet RECENT file can be obtained (downloaded) from Aminet. "
"It is a list containing the new files in Aminet. "
"\n\n"
("For example: \"%s\"" (tackon AminetPath "RECENT"))
))
(default AminetRecentFile)
))
;;
(complete 30)
(set AminetTreeFile (askfile
(prompt
"Please select your Aminet TREE file"
)
(help (cat
"The Aminet TREE file can be used to create or update the Aminet directory hierarchy. "
"You do not need to maintain a complete Aminet tree, because CleanupIncoming will create "
"all needed directories automatically. "
"Using the TREE file however adds filenotes to all directories. "
"\n\n"
("For example: \"%s\"" (tackon AminetPath "TREE"))
))
(default AminetTreeFile)
))
;;
(complete 35)
(set FastIndexPath (askdir
(prompt
"Please select your fast index path"
)
(help (cat
"MirrorManager can split your Aminet INDEX file and create several small index files. "
"Looking up a file in these small index files is much faster than using INDEX. "
"We now need to know where you want MirrorManager to look for these files."
"\n\n"
("For example: \"%s\"" (tackon AminetPath "fastindex"))
))
(default FastIndexPath)
))
;;
(complete 40)
(set LocalIndexFile (askfile
(prompt
"Please select your LOCAL index file"
)
(help (cat
"The LOCAL index file is -- like the Aminet INDEX file -- a list containing "
"all files in your local Aminet mirror. "
"MirrorManager will create such a local index file for you. "
"We only need to know a name for it."
"\n\n"
("For example: \"%s\"" (tackon AminetPath "LOCAL"))
))
(default LocalIndexFile)
))
;;
(complete 45)
(set WantedIndexFile (askfile
(prompt
"Please select your WANTED index file"
)
(help (cat
"The WANTED file can be used to for auto-downloads from Aminet. "
"The supplied Term and NComm scripts allow downloading of files "
"listed in the WANTED index file. "
"MirrorManager can then use this WANTED file to clean up your "
"incoming directory and add filenotes."
"\n\n"
("For example: \"%s\"" (tackon AminetPath "WANTED"))
))
(default WantedIndexFile)
))
;;
(complete 50)
(set HiddenFile (askfile
(prompt
"Please select the list of files to hide in LOCAL"
)
(help (cat
"The HIDDEN file lists all files and directories "
"which should NOT appear in your LOCAL Aminet index file. "
"E.g. if you put this HIDDEN file into your Aminet directory, "
"then your LOCAL index file would normally contain this file. "
"However this might be not what you want. "
"You can hide files or directories by adding them to this HIDDEN file."
"\n\n"
("For example: \"%s\"" (tackon AminetPath "HIDDEN"))
))
(default HiddenFile)
))
;;
(complete 55)
(set IndexedFile (askfile
(prompt
"Please select the list of files to include in LOCAL"
)
(help (cat
"If you want to list only some of the directories in the Aminet tree "
"then you can list them in the INDEXED file. "
"Only the files or directories listed in the INDEXED file will appear "
"in your LOCAL index file. "
"This method can be used as an alternative to using the HIDDEN file."
"\n\n"
("For example: \"%s\"" (tackon AminetPath "INDEXED"))
))
(default IndexedFile)
))
;;
(complete 60)
(set RemapFile (askfile
(prompt
"Please select your remap file"
)
(help (cat
"If you want CleanupIncoming to copy all files in the Aminet directory A "
"to a different directory B then you can create a REMAP file which contains "
"the list of Aminet directories which are to be relocated. "
"In the above case it would contain a line:"
"\n\n A B\n\n"
("which indicates that the files in your %s directory " IncomingPath)
"shall be copied to B instead of A."
"\n\n"
("For example: \"%s\"" (tackon AminetPath "MAP"))
))
(default RemapFile)
))
;;
(complete 65)
(textfile
(prompt ("Generating %s" AssignmentsFile))
(help @textfile-help)
(dest AssignmentsFile)
(append (cat "\n"
("IncomingPath = \"%s\"\n" IncomingPath)
("AminetPath = \"%s\"\n" AminetPath)
("KickedPath = \"%s\"\n" KickedPath)
("FastIndexPath = \"%s\"\n" FastIndexPath)
("AminetIndexFile = \"%s\"\n" AminetIndexFile)
("AminetRecentFile = \"%s\"\n" AminetRecentFile)
("AminetTreeFile = \"%s\"\n" AminetTreeFile)
("LocalIndexFile = \"%s\"\n" LocalIndexFile)
("WantedIndexFile = \"%s\"\n" WantedIndexFile)
("HiddenFile = \"%s\"\n" HiddenFile)
("IndexedFile = \"%s\"\n" IndexedFile)
("RemapFile = \"%s\"\n" RemapFile)
))
)
(complete 80)
(working ("Configuring %s... Please wait..." configureScript))
(if (run ("%s > ENV:installer-result %s SCRIPT \"%s\" WITH \"%s\"" RX-command ConfigureREXX configureScript AssignmentsFile))
(abort ("%s\n" (getenv "installer-result")))
)
(complete 90)
(working "Generating installer code...")
(if (run ("%s > %s %s READ SCRIPT \"%s\"" RX-command AssignmentsFile ConfigureREXX configureScript))
(abort ("%s\n" (getenv "installer-result")))
)
(complete 95)
(working ("Configuring myself ..."))
(if (run ("%s > ENV:installer-result %s SCRIPT \"%s\" WITH \"%s\" DELIMITER \";@\" TERMINATOR \";end\"" RX-command ConfigureREXX @icon AssignmentsFile))
(abort ("%s\n" (getenv "installer-result")))
)
(complete 99)
(delete AssignmentsFile (prompt "Deleting temporary file..."))
(delete "ENV:installer-result" (prompt "Deleting temporary file..."))
)
;;
(set @default-dest (expandpath @execute-dir))
(if (NOT (AND
(exists ConfigureREXX)
(exists @app-name)))
(abort (cat
("This script needs %s and %s in it's directory. " ConfigureREXX @app-name)
"At least one of them is not available."
))
)
(message (cat
("We will now ask you for all currently supported path and filenames in order to configure %s.\n" @app-name)
"If you're not sure about what all these path and filenames stand for then try clicking Help. "
"If this doesn't help then you should have a look at the supplied docs.\n"
("Please note that this operation will fail if you overwrote %s by saving it from within the GUI." @app-name)
))
(transcript "Configuring MirrorManager ...")
(set configureScript @app-name)
(configureMirrorManager)
(if (exists ProgramIcon)
(tooltype
(prompt ("Setting the MirrorManager default configuration to %s..." @app-name))
(help (cat
"We are about to set the CONFIG tooltype of the MirrorManager application to\n\n"
("CONFIG=%s\n\n" @app-name)
"This will force MirrorManager to come up with your default configuration "
"each time you double-click the promgram icon."
))
(dest ProgramIcon)
(settooltype "CONFIGNAME" ("rexx/%s" @app-name))
(confirm)
)
)
(complete 100)
(exit (cat
"The MirrorManager default configuration has been modified. "
("Note that you must never overwrite %s by saving it from within the GUI. " @app-name)
("Instead you should edit %s with an ASCII Editor like e.g. MEmacs. " @app-name)
))
;end